    $(function () {
        var current = 1;
        $.ajax({
            url: "/page/quartzs",
            datatype: 'json',
            type: "POST",
            data: {'current':current,'size':15},
            success: function (data) {
                if (data != null) {
                	var dataHtml;
                	dataHtml += '<tbody>';
                    $.each(data.records, function (index, item) { //遍历返回的json
                    	dataHtml += '<tr>';
                    	dataHtml += '<td class=" text-center">' + item.id + '</td>';
                    	dataHtml += '<td class=" text-center">' + item.ramake + '</td>';
                    	dataHtml += '<td class=" text-center">' + item.targetUrl + '</td>';
                    	dataHtml += '<td class=" text-center">' + item.targetTime + '时</td>';
                    	dataHtml += '<td class=" text-center">' + item.createTime + '</td>';
                    	dataHtml += '<td class=" text-center">' + item.targetCount + '</td>';
                    	if(item.enble==0){
                    		dataHtml += '<td class=" text-center">';
                        	dataHtml += '暂停，启动请点击<a href="/quartz/startQuartz?id='+item.id+'"><i class="glyphicon glyphicon-play"></i></a>';
                            dataHtml += '</td>'
                    	}else{
                    		dataHtml += '<td class=" text-center">';
                        	dataHtml += '启动，暂停请点击<a href="/quartz/stopQuartz?id='+item.id+'"><i class="glyphicon glyphicon-stop"></i></a>';
                            dataHtml += '</td>'
                    	}
                    	dataHtml += '<td class=" text-center">';
                    	dataHtml += '<a href="/quartz/add?id='+item.id+'"><i class="glyphicon glyphicon-edit"></i></a>&nbsp;&nbsp;<a href="/quartz/delete?id='+item.id+'"><i class="glyphicon glyphicon-minus"></i></a>';
                        dataHtml += '</td>';
                    	dataHtml += '</tr>';
                    });
                    dataHtml += '</tbody>';
                    $('#dataHtml').after(dataHtml);
                    var pageCount = data.pages; //取到pageCount的值(把返回数据转成object类型)
                    var currentPage = data.current; //得到urrentPage
                    var options = {
                        bootstrapMajorVersion: 2, //版本
                        currentPage: currentPage, //当前页数
                        totalPages: pageCount, //总页数
                        itemTexts: function (type, page, current) {
                            switch (type) {
                                case "first":
                                    return "首页";
                                case "prev":
                                    return "上一页";
                                case "next":
                                    return "下一页";
                                case "last":
                                    return "末页";
                                case "page":
                                    return page;
                            }
                        },//点击事件，用于通过Ajax来刷新整个list列表
                        onPageClicked: function (event, originalEvent, type, page) {
                            $.ajax({
                                url: "/page/quartzs?current=" + page,
                                type: "POST",
                                data: {'current':page,'size':15},
                                success: function (data1) {
                                	var dataHtml;
                                	dataHtml += '<tbody>';
                                    if (data1 != null) {
                                        $.each(data1.records, function (index, item) { //遍历返回的json
                                        	dataHtml += '<tr>';
                                        	dataHtml += '<td class=" text-center">' + item.id + '</td>';
                                        	dataHtml += '<td class=" text-center">' + item.ramake + '</td>';
                                        	dataHtml += '<td class=" text-center">' + item.targetUrl + '</td>';
                                        	dataHtml += '<td class=" text-center">' + item.targetTime + '</td>';
                                        	dataHtml += '<td class=" text-center">' + item.createTime + '</td>';
                                        	dataHtml += '<td class=" text-center">' + item.targetCount + '</td>';
                                        	if(item.enble==0){
                                        		dataHtml += '<td class=" text-center">';
                                            	dataHtml += '暂停，启动请点击<a href="/quartz/startQuartz?id='+item.id+'"><i class="glyphicon glyphicon-play"></i></a>';
                                                dataHtml += '</td>'
                                        	}else{
                                        		dataHtml += '<td class=" text-center">';
                                            	dataHtml += '启动，暂停请点击<a href="/quartz/stopQuartz?id='+item.id+'"><i class="glyphicon glyphicon-stop"></i></a>';
                                                dataHtml += '</td>'
                                        	}
                                        	dataHtml += '<td class=" text-center">';
                                        	dataHtml += '<a href="/quartz/add?id='+item.id+'"><i class="glyphicon glyphicon-edit"></i></a>&nbsp;&nbsp;<a href="/quartz/delete?id='+item.id+'"><i class="glyphicon glyphicon-minus"></i></a>';
                                            dataHtml += '</td>';
                                        	dataHtml += '</tr>';
                                        });
                                        dataHtml += '</tbody>';
                                        $('#dataTable tbody').html("");
                                        $('#dataHtml').after(dataHtml);
                                    }
                                }
                            });
                        }
                    };
                    $('#example').bootstrapPaginator(options);
                }
            }
        });
    })
